<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>酷妈妈商城</title>
</head>
<body>
	<h1>商品详情</h1>
	<c:if test="${empty product }">
		<h2>您查询的商品不存在</h2>
	</c:if>
	<c:if test="${not empty product }">
		商品编号 ${product.id }<br />
		<h2>商品名称 ${product.name }</h2>
		<h3>商品分类 ${product.category }</h3>
		<h3>商品描述 ${product.description }</h3>
		<img src="<%=path %>/${product.img}" />
		<br />
		<h3 style="color: red; font-weight: bold">
			价格 ： ${product.price }<img
				src="<%=path %>/image/buy.bmp"
				onclick="location.href='<%=basePath %>CartServlet?id=${product.id }';"
				style="cursor: pointer;" />
		</h3>
		<hr />
	</c:if>
</body>
</html>